﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="list.aspx.vb" Inherits="WuggiSum.list" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <a href="WuggiRSS.aspx"><img alt="" class="RSSImage"  src="images\RSS.png" /></a>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="m_id" DataSourceID="WugSource" Width="100%" AllowSorting="True" AlternatingRowStyle-BackColor="#E6E6E6" AllowPaging="True">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="m_id" DataNavigateUrlFormatString="details.aspx?WuggiQuery={0}" DataTextField="m_title" HeaderText="Title" SortExpression="m_title" />
                <asp:ImageField DataImageUrlField="m_poster" DataImageUrlFormatString="/Images/{0}" HeaderText="Poster's Thumbnail">
                    <ControlStyle CssClass="Thumbnails"> </ControlStyle> 
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ImageField>
                <asp:BoundField DataField="m_pg" HeaderText="PG Rating" SortExpression="m_pg" />
                <asp:BoundField DataField="m_year" HeaderText="Year" SortExpression="m_year" />
                <asp:BoundField DataField="s_genre" HeaderText="Subgenre" SortExpression="s_genre" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="WugSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT a.[m_id], a.[m_title], a.[m_poster], a.[m_pg], a.[m_year], b.[s_genre] FROM [movies] a , [subgenre] b where a.[sub_id] = b.[sub_id]">
        </asp:SqlDataSource>
        <br />
    </p>
    <p align="center"></p>
    <p>&nbsp;</p>
    <p></p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
</asp:Content>
